<?PHP



		//get command
		
		//get ID
		
			if(!empty($conf->controller))
			{
				include $conf->controller;


			}

		if($conf->module=='category')
		{
			//get content based on category					
			$category_query= new category();					
			$content_data=new content_data();
			$content_data->content_id=$category_query->get_category_id($conf->key_string);
			$content=$content_data->get_content_by_category();
			$content=current($content);
			$conf->title=$conf->title.' - '.$content['content_title'];
		
			
		}
		
	
	
		if($conf->module=='content')
		{
			$content_data=new content_data();	
					

				
			$content_data->content_title=$conf->key_string;	
			
			
					
			$content=$content_data->get_content_by_name();
			
			if(!empty($conf->cat))
			{
					foreach ($content as $x)
					{
						if($x['content_category']==$conf->cat)
						{
								$what[]=$x;
						}

					}				
					$content=current($what);
			}
			else
			{
				$content=current($content);
			}
			
			if(!empty($content))
			{
						$category_query= new category();
						$category_query->category_id=$content['content_category'];
						$category_data=$category_query->get_category();
						$content_serial=unserialize($content['content_serial']);

						$conf->style['background']='background-color:#'.$content_serial["serial_bgcolor"].';';
						$conf->style['background'].='background-image:url('.ap($content_serial["serial_bg"]).');';
						$conf->style['masthead']=$content['content_title'];
						$crumbs=$conf->a['site-name'].' > '.$category_data['category_name'].' > '.$content['content_title'];
						$conf->title=$conf->title.' - '.$content['content_title'];
			}
	
			
		}
		
		
		
		if($conf->module=='contentid')
		{


			$content_data=new content_data();		
			$content_data->content_id=$conf->key_string;			
			$content=$content_data->get_content_by_id();
			$content=current($content);


		}
		
	
		
		
		

	?>
	